They have stinging cells in their tentacles that allows them to paralyze their prey—usually small fish, or shrimp—and then move them towards their mouth.
Plus, corals are related to anemones and jellyfish, and the fleshy polyps have nasty stinging cells called , which resemble tiny harpoons that spear prey or potential attackers and can inject chemicals.